import 'package:flutter/material.dart';
import 'package:flutter04/widget/swiper.dart';

class PageViewSwiperPage extends StatefulWidget {
  const PageViewSwiperPage({super.key});

  @override
  State<PageViewSwiperPage> createState() => _PageViewSwiperPageState();
}

class _PageViewSwiperPageState extends State<PageViewSwiperPage> {
  List<String> list = [];

  @override
  void initState() {
    super.initState();
    list = [
      "https://fs.aihujiankang.com/3fa29e3c1d4c5556e3d1e16dc19f331f01d80060b9cbf11958707a570cdf9354.jpg",
      "https://fs.aihujiankang.com/5de4457a087db5cedce118f513c59c6b7dc4b7bb872c5841e5681a4be5b5bc8b.jpg",
      "https://fs.aihujiankang.com/5872e3e4b212779a3dc1724c1468070607f15d2e4ff300aa65f5ce2a4871d769.jpg",
      "https://fs.aihujiankang.com/38dc04a1f2b1b72e1e9351aa079dfafa5d4d702383c50c2f3e37d72ee1cb02a9.jpg",
      "https://fs.aihujiankang.com/b1a638765fc09a06b874b281d0197db665b9c5eeb5b0d700da8375e2dd526a12.jpg",
    ];
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("PageView 轮播图 演示"),
      ),
      body: ListView(
        children: [
          SwiperWidget(
            list: list,
          ),
        ],
      ),
    );
  }
}
